var reviewDetails = {};
reviewDetails.methods = {};

$(function(){
    reviewDetails.methods.reviewDetailsStars();

})

//星星
reviewDetails.methods.reviewDetailsStars = function(){
        var starNum =  parseInt($(".shop-reviewDetails-stars i").text());
        if(starNum < 1 || starNum > 10){
            $(".shop-reviewDetails-stars i").text("");
            $(".shop-reviewDetails-stars i").css("width",0);
            return;
        }else{
            var newStarNum = ((starNum*14.8)/74*100)/2 + "%";
            $(".shop-reviewDetails-stars i").css("width",newStarNum);
            $(".shop-reviewDetails-stars-box span").text($(".shop-reviewDetails-stars i").text()+"分");
            $(".shop-reviewDetails-stars i").text("");
        }
}
